package com.aliyun.sample;

public class SofamqConfig {
    private String accessKey;
    private String accessKeySecret;
    private String endPoint;
    private String groupId;
    private String instanceId;
    private String pushGatewayUrl;
    public SofamqConfig(){}
    public SofamqConfig(String ak, String sk, String endPoint, String gid, String iid, String url) {
        this.accessKey = ak;
        this.accessKeySecret = sk;
        this.groupId = gid;
        this.endPoint = endPoint;
        this.instanceId = iid;
        this.pushGatewayUrl = url;
    }

    public boolean check() {
        if(this.accessKey == null || this.accessKey == "") {
            return false;
        }
        if(this.accessKeySecret == null || this.accessKeySecret == "") {
            return false;
        }
        if(this.endPoint == null || this.endPoint == "") {
            return false;
        }
        if(this.groupId == null || this.groupId == "") {
            return false;
        }
        if(this.instanceId == null || this.instanceId == "") {
            return false;
        }
        if(this.pushGatewayUrl == null || this.pushGatewayUrl == "") {
            return false;
        }
        return true;
    }

    public String getPushGatewayUrl() {
        return pushGatewayUrl;
    }

    public void setPushGatewayUrl(String pushGatewayUrl) {
        this.pushGatewayUrl = pushGatewayUrl;
    }

    public String getEndPoint() {
        return endPoint;
    }

    public void setEndPoint(String endPoint) {
        this.endPoint = endPoint;
    }

    public String getAccessKey() {
        return accessKey;
    }

    public void setAccessKey(String accessKey) {
        this.accessKey = accessKey;
    }

    public String getAccessKeySecret() {
        return accessKeySecret;
    }

    public void setAccessKeySecret(String accessKeySecret) {
        this.accessKeySecret = accessKeySecret;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getInstanceId() {
        return instanceId;
    }

    public void setInstanceId(String instanceId) {
        this.instanceId = instanceId;
    }

    @Override
    public String toString() {
        return "SofamqConfig{" +
                "accessKey='" + accessKey + '\'' +
                ", accessKeySecret='" + accessKeySecret + '\'' +
                ", endPoint='" + endPoint + '\'' +
                ", groupId='" + groupId + '\'' +
                ", instanceId='" + instanceId + '\'' +
                ", pushGatewayUrl='" + pushGatewayUrl + '\'' +
                '}';
    }
}
